import Axios from './api';

/**
 * 获取枚举类型键值对
 */
export const getStatusInfo = () => Axios.get('/api/mStatusInfo/anyone/getStatus/v1');

/**
 * 获取微信获取访问链接拿code
 */
export const getWeChatUrl = (url) => Axios.get('/api/weChat/anyone/getWeChatUrl/v1',{
  url:url
});

/**
 * 注册/登录
 */
export const doLogin = (data) => Axios.post('/doLogin',data);

/**
 * 是否接受微信通知
 */
export const updateWxnotice = (id,isWxNotice) => Axios.get('/api/musrUser/user/updateWxnotice/v1',{
  id:id,
  isWxNotice:isWxNotice,
});

/**
 * 退出登录
 */
export const doLoginOut = () => Axios.get('/doLoginOut');

/**
 * 注销用户
 */
export const deleteUser = () => Axios.get('/api/musrUser/user/deleteUser/v1');

/**
 * 重置密码
 */
export const updatePassword = (id,password,smsKey,smsCode) => Axios.get('/api/musrUser/anyone/updatePassword/v1',{
  id:id,
  password:password,
  smsKey: smsKey,
  smsCode: smsCode
});

/**
 * 修改密码
 */
export const changePassword = (id,oldPassword,password) => Axios.get('/api/musrUser/anyone/updatePwd/v1',{
  id:id,
  oldPassword:oldPassword,
  password:password,
});

/**
 * 获取用户信息
 */
export const getUserMsg = (wx,code) => Axios.get('/api/musrUser/anyone/getUserMsg/v1',{
  channel: wx,
  code: code
});

/**
 * 获取用户账户信息
 */
export const getAccount = () => Axios.get('/api/maccAccount/user/getAccount/v1');

/**
 * 用户修改个人信息(设置国家/昵称/头像)
 */
export const updateByUser = (data) => Axios.get('/api/musrUser/user/updateByUser/v1',data);

/**
 * 获取首页轮播图/首页广告位
 */
export const getResAndMedia = (code) => Axios.get('/api/mresResourceDefine/anyone/getResAndMediaList/v1',{
  code:code
});

/**
 * 获取首页明星店铺
 */
export const getShopFamousList = (pageNum,pageSize,productSize) => Axios.get('/api/mshpShopFamous/anyone/getShopFamousList/v1',{
  pageNum: pageNum,
  pageSize: pageSize,
  productSize: productSize,
});

/**
 * 获取拍品列表
 */
export const getProductList = (data) => Axios.post('/api/mprdProduct/anyone/queryProductListForMall/v1',data);

/**
 * 获取所有朝代分类
 */
export const getALLDynastyList = () => Axios.get('/api/mprdDynasty/user/getPrdDynastyList/v1');

/**
 * 获取朝代分类(显示拍品数量)
 */
export const getDynastyList = (data) => Axios.get('/api/mprdProduct/anyone/getProductCountByDynasty/v1',data);

/**
 * 获取朝代列表(显示藏品数量)
 */
export const getAlbumDynastyList = () => Axios.get('/api/album/user/dynastyLists/v1');

/**
 * 获取专场列表
 */
export const getSpecialList = (data) => Axios.post('/api/mspcSpecial/anyone/querySpecialListForMall/v1',data);

/**
 * 获取星期列表
 */
export const getWeekList = (data) => Axios.get('/api/mspcSpecial/anyone/getSpecialNum/v1',data);

/**
 * 获取店铺列表
 */
export const getShopList = (data) => Axios.post('/api/mshpShop/anyone/queryShopForMall/v1',data);

/**
 * 获取店铺详情
 */
export const getShopDetail = (data) => Axios.get('/api/mshpShop/anyone/getShopDetail/v1',data);

/**
 * 获取拍品详情
 */
export const getProductDetail = (data) => Axios.get('/api/mprdProduct/anyone/updateProduct/v1',data);

/**
 * 获取专场详情信息
 */
export const getSpecialDetail = (data) => Axios.get('/api/mspcSpecial/anyone/updateSpecialDetail/v1',data);

/**
 * 获取用户是否关注
 */
export const getFollow = (id,followersType) => Axios.get('/api/musrUser/user/isFollowers/v1',{
  id:id,
  followersType:followersType,//1.拍品 2.店铺 3.专场
});

/**
 * 关注专场/取关专场
 */
export const updateSpecialFollowers = (id,followerType) => Axios.get('/api/mspcSpecialFollowers/user/updateSpecialFollowers/v1',{
  specialId:id,
  followerType:followerType,//0：取关， 1：关注
});

/**
 * 关注店铺/取关店铺
 */
export const updateShopFollowers = (id,followerType) => Axios.get('/api/mshpShopFollowers/user/updateShopFollowers/v1',{
  shopId:id,
  followerType:followerType,//0：取关， 1：关注
});

/**
 * 关注拍品/取关拍品
 */
export const updateProductFollowers = (id,followerType) => Axios.get('/api/mprdProductFollowers/user/updateProductFollowers/v1',{
  productId:id,
  followerType:followerType,//0：取关， 1：关注
});

/**
 * 获取所有评论列表
 */
export const getProductCommentList = (id) => Axios.get('/api/mprdProductComment/anyone/getProductCommentList/v1',{
  productId:id
});

/**
 * 拍品评论-发送评论
 */
export const sendComment = (data) => Axios.get('/api/mprdProductComment/user/saveProductComment/v1',data);

/**
 * 拍品评论-评论点赞
 */
export const greatComment = (id) => Axios.get('/api/mprdProductComment/anyone/updateProductCommentNums/v1',{
  id:id
});

/**
 * 获取地址列表
 */
export const getAddressList = () => Axios.get('/api/mordAddress/user/getAddressList/v1');

/**
 * 设置默认地址
 */
export const setDefaultAddress = (id) => Axios.get('/api/mordAddress/user/saveDefaultAddress/v1',{
  id:id
});

/**
 * 删除地址
 */
export const removeAddress = (id) => Axios.get('/api/mordAddress/user/deleteAddress/v1',{
  id:id
});

/**
 * 保存地址
 */
export const saveAddress = (data) => Axios.get('/api/mordAddress/user/saveAddress/v1',data);

/**
 * 获取默认地址
 */
export const getDefaultAddress = () => Axios.get('/api/mordAddress/user/getDefaultAddress/v1');

/**
 * 提交订单
 */
export const addOrder = (data) => Axios.get('/api/mordProductOrder/user/addOrder/v1',data);

/**
 * 获取我参与竞拍的拍品列表
 */
export const getMyProductList = (data) => Axios.get('/api/mprdProduct/user/getMyProductList/v1',data);

/**
 * 获取搜索词联想
 */
export const getSearchWordInfo = (data) => Axios.post('/api/searchWordInfo/anyone/getSearchWordInfoForMall/v1',data);

/**
 * 支付保证金、余额
 */
export const saveRechargeOrder = (txOrderType,needPayMoney,payChannel) => Axios.get('/api/mordRechargeOrder/user/saveRechargeOrder/v1',{
  txOrderType:txOrderType,
  needPayMoney:needPayMoney,
  payChannel:payChannel
});

/**
 * 拍品竞价出价
 */
export const saveBidHistory = (data) => Axios.get('/api/mprdBidHistory/user/saveBidHistory/v1',data);

/**
 * 上传图片
 */
export const uploadImage = (data) => Axios.post('/api/storage/user/uploadImage/v1',data,'formData');

/**
 * 店铺认证-提交
 */
export const shopAuditting = (data) => Axios.get('/api/mshpShopAuditting/user/approveByUser/v1',data);

/**
 * 个人认证-提交
 */
export const userAuditting = (data) => Axios.get('/api/musrUserIdCard/user/approveByUser/v1',data);

/**
 * 获取用户实名认证信息
 */
export const getUserIdCardMsg = () => Axios.get('/api/musrUserIdCard/user/getUserIdCardMsg/v1');

/**
 * 获取银行卡信息
 */
export const queryCardDetail = () => Axios.get('/api/bankCard/user/queryCardDetail/v1');

/**
 * 修改银行卡
 */
export const modifyUserBankCard = (data) => Axios.post('/api/bankCard/user/modifyUserBankCard/v1',data);

/**
 * 店铺认证详情
 */
export const getApproveByUser = () => Axios.get('/api/mshpShopAuditting/user/getApproveByUser/v1');



/**
 * 发布拍品
 */
export const publishProduct = (data) => Axios.post('/api/mprdProduct/user/updateReleaseProduct/v1',data,'json');

/**
 * 保存专场
 */
export const saveSpecial = (data) => Axios.get('/api/mspcSpecial/user/saveSpecial/v1',data);

/**
 * 添加拍品到专场
 */
export const insertSpecialProducts = (data) => Axios.post('/api/mspcSpecialProducts/user/insertSpecialProducts/v1',data,'json');

/**
 * 发布专场
 */
export const publishSpecial = (id) => Axios.get('/api/mspcSpecial/user/updateReleaseSpecial/v1',{
  id:id,
});

/**
 * 检查保证金是否足够
 */
export const getDifferCashDeposit = (productId,snapshootId,cashDeposit) => Axios.get('/api/mprdBidHistory/user/getDifferCashDeposit/v1',{
  productId:productId,
  snapshootId:snapshootId,
  cashDeposit:cashDeposit
});

/**
 * 获取买家订单列表
 */
export const getMyOrderList = (data) => Axios.get('/api/mordProductOrder/user/getMyOrderList/v1',data);

/**
 * 获取订单详情
 */
export const getMyOrderDetail = (id) => Axios.get('/api/mordProductOrder/user/getMyOrderDetail/v1',{
  id:id
});

/**
 * 删除订单
 */
export const deleteOrder = (id) => Axios.get('/api/mordProductOrder/user/deleteOrder/v1',{
  id:id
});

/**
 * 发货提醒
 */
export const deliverReminding = (id) => Axios.get('/api/mordProductOrder/user/deliverReminding/v1',{
  id:id
});

/**
 * 确认收货
 */
export const collectOrder = (id) => Axios.get('/api/mordProductOrder/user/collectOrder/v1',{
  id:id
});

/**
 * 评价
 */
export const evaluate = (data) => Axios.get('/api/mordProductOrder/user/evaluate/v1',data);

/**
 * 查看评价
 */
export const getEvaluate = (orderId) => Axios.get('/api/mordProductOrder/user/getEvaluate/v1',{orderId:orderId});

/**
 * 退货时选择物流公司
 */
export const express = (data) => Axios.get('/api/express/user/selectListForMall/v1',data);

/**
 * 客服维权退货
 */
export const safeguardOrder = (data) => Axios.post('/api/mordProductOrder/user/safeguardOrder/v1',data,'json');

/**
 * 获取售后状态
 */
export const getSafeguard = (id) => Axios.post('/api/mordProductOrder/user/getSafeguard/v1',{id:id});

/**
 * 获取卖家卖出的订单列表
 */
export const getSellOrderList = (data) => Axios.get('/api/mordProductOrder/user/getSerllersOrderList/v1',data);

/**
 * 卖家发货
 */
export const sellerDelivery = (data) => Axios.get('/api/mordProductOrder/user/delivery/v1',data);

/**
 * 查看藏品列表
 */
export const getCollectionList = (data) => Axios.post('/api/album/user/selectList/v1',data);

/**
 * 查询藏品详情
 */
export const getCollectionDetail = (id) => Axios.post('/api/album/user/detail/v1',{id:id});

/**
 * 保存藏品
 */
export const saveCollection = (data) => Axios.post('/api/album/user/save/v1',data,'json');

/**
 * 文件夹列表
 */
export const getmalbdirectory = (userId) => Axios.get('/api/malbdirectory/user/getmalbdirectory/v1',{userId:userId});

/**
 * 获取文件夹详情
 */
export const getMalbDirectoryInfo = (directoryId) => Axios.get('/api/malbdirectory/user/getMalbDirectoryInfo/v1',{id:directoryId});

/**
 * 添加文件夹
 */
export const addmalbdirectory = (name,userId) => Axios.get('/api/malbdirectory/user/addmalbdirectory/v1',{name:name,userId:userId});

/**
 * 删除文件夹
 */
export const deletemalbdirectory = (id) => Axios.get('/api/malbdirectory/user/deletemalbdirectory/v1',{id:id});

/**
 * 修改文件夹
 */
export const updatemalbdirectory = (name,id) => Axios.get('/api/malbdirectory/user/updatemalbdirectory/v1',{name:name,id:id});

/**
 * 删除藏品媒体资源
 */
export const deleteMedia = (data) => Axios.post('/api/albumMedia/user/delete/v1',data);

/**
 * 删除藏品
 */
export const deleteCollection = (data) => Axios.post('/api/album/user/delete/v1',data,'json');

/**
 * 获取选中的藏品列表/相册详情藏品列表
 */
export const getSelectedAlbumList = (data) => Axios.post('/api/album/user/getSelectedAlbumList/v1',data);

/**
 * 保存藏品和分类关系
 */
export const saveAlbumRefDirectory = (data) => Axios.post('/api/albumRefDirecotry/user/saveAlbumRefDirectory/v1',data,'json');

/**
 * 上传媒体资源文件
 */
export const uploadMedia = (data) => Axios.post('/api/storage/user/uploadMedia/v1',data,'formData');

/**
 * 账单月收入，支出
 */
export const getIncomeOrExpenditureByMonth = (createTime) => Axios.get('/api/maccAccounTransaction/user/getIncomeOrExpenditureByMonth/v1', {
  createTime:createTime
});

/**
 * 账单列表
 */
export const getBills = (data) => Axios.get('/api/maccAccounTransaction/user/getBills/v1', data);

/**
 * 收入排行
 */
export const getHighestIncome = (createTime,queryType) => Axios.get('/api/maccAccounTransaction/user/getHighestIncome/v1', {
  createTime:createTime,
  queryType:queryType
});

/**
 * 账单详情
 */
export const getBillDetail = (id) => Axios.get('/api/maccAccounTransaction/user/getDetail/v1', {
  id:id
});

/**
 * 我的关注
 */
export const getMyFollowers = () => Axios.get('/api/musrUser/user/myFollowers/v1');








































